package chixing.day09.work;

public class ProductUtils {
    public static double getSumPrice(Product[] proArray) {
        if (proArray == null) {
            return 0;
        }

        double total = 0;
        for (Product product : proArray) {
            if (product != null) {
                total += product.getDiscountPrice();
            }
        }
        return total;
    }
}
